<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>注册 - 便签系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css" rel="stylesheet">
    <link href="/css/custom.css" rel="stylesheet">
</head>
<body class="login-bg">
    <div class="container">
        <div class="register-form fade-in">
            <div class="text-center mb-4">
                <i class="bi bi-sticky-fill" style="font-size: 3rem; color: var(--primary-color);"></i>
                <h2 class="register-title">便签系统 - 注册</h2>
            </div>
            
            <div th:if="${error}" class="alert alert-danger" th:text="${error}"></div>
            
            <form action="/register" method="post">
                <div class="mb-3">
                    <label for="username" class="form-label">
                        <i class="bi bi-person-plus me-1"></i>用户名
                    </label>
                    <input type="text" class="form-control" id="username" name="username" required>
                </div>
                <div class="mb-3">
                    <label for="password" class="form-label">
                        <i class="bi bi-lock me-1"></i>密码
                    </label>
                    <input type="password" class="form-control" id="password" name="password" required>
                    <div class="form-text text-muted">
                        <i class="bi bi-info-circle me-1"></i>密码必须包含字母、数字和特殊字符，且长度不少于8位
                    </div>
                </div>
                <div class="mb-3">
                    <label for="email" class="form-label">
                        <i class="bi bi-envelope me-1"></i>邮箱
                    </label>
                    <input type="email" class="form-control" id="email" name="email">
                </div>
                <div class="d-grid gap-2 mt-4">
                    <button type="submit" class="btn btn-primary">
                        <i class="bi bi-person-check me-1"></i>注册
                    </button>
                </div>
            </form>
            
            <div class="mt-4 text-center">
                <a href="/login" class="text-decoration-none">去登录</a>
            </div>
        </div>
    </div>
</body>
</html> 